import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import "antd/dist/reset.css";
import HeaderNav from "./components/layout/headerNav";

const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: "博客网站",
  description: "个人博客网站",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="zh-CN">
      <body
        className={`${geistSans.variable} ${geistMono.variable} antialiased`}
      >
        {/* 固定导航栏 */}
        <HeaderNav />
        
        {/* 内容区域 - 添加顶部内边距防止被导航栏遮挡 */}
        <main className="pt-16 min-h-screen">
          {children}
        </main>
        
        {/* 页脚区域 */}
        <footer className="bg-gray-100 py-4 border-t">
          <div className="container mx-auto px-4 text-center text-gray-600 text-sm">
            © {new Date().getFullYear()} 博客网站 - 保留所有权利
          </div>
        </footer>
      </body>
    </html>
  );
}